package cn.edu.ysu.zry.entity;

/**
 * @program: XieyiBlockChainOS
 * @description: 区块链头部信息
 * @author: Ruiyuan Zhang
 * @create: 2020-04-20 17:20
 */
public class BlockHead {
    // 上一个区块的hash值
    byte lastBlockHead[];
    // 时间戳
    long time;
    // Merkle树的根值
    byte merkleRoot[];
    // 监管机构的认证签名
    byte signZhongxin[];
    // 以上内容的hash值
    byte hashBlockHeadeAll[];

    // 区块体 - 重节点使用
    BlockBody blockBody;

    /**
     * getter and setter
     */
    public byte[] getLastBlockHead() {
        return lastBlockHead;
    }

    public void setLastBlockHead(byte[] lastBlockHead) {
        this.lastBlockHead = lastBlockHead;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public byte[] getMerkleRoot() {
        return merkleRoot;
    }

    public void setMerkleRoot(byte[] merkleRoot) {
        this.merkleRoot = merkleRoot;
    }

    public byte[] getSignZhongxin() {
        return signZhongxin;
    }

    public void setSignZhongxin(byte[] signZhongxin) {
        this.signZhongxin = signZhongxin;
    }

    public byte[] getHashBlockHeadeAll() {
        return hashBlockHeadeAll;
    }

    public void setHashBlockHeadeAll(byte[] hashBlockHeadeAll) {
        this.hashBlockHeadeAll = hashBlockHeadeAll;
    }

    public BlockBody getBlockBody() {
        return blockBody;
    }

    public void setBlockBody(BlockBody blockBody) {
        this.blockBody = blockBody;
    }
}
